package org.linlinjava.litemall.wx.vo.cart;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel(value="购物车添加商品请求类",description="购物车添加商品请求类")
public class CartAddReqVO {

	//添加到购物车时传递的参数
	@ApiModelProperty(value = "店铺id")
	@NotNull
	private Integer shopId;

	@ApiModelProperty(value = "价格")
	@NotNull
	private BigDecimal price;

	@ApiModelProperty(value = "类型 商品｜套餐")
	private CartAddPackageReqVO cartPackage;

	@ApiModelProperty(value = "类型 商品｜套餐")
	private CartAddGoodsReqVO cartGoods;

	@Data
	@ApiModel(value="购物车添加商品请求类",description="购物车添加商品请求类")
	public static class CartAddPackageReqVO {

		@ApiModelProperty(value = "商品id")
		private Integer packageId;

		@ApiModelProperty(value = "购买数量")
		@NotNull
		private Integer number;

		@ApiModelProperty(value = "辅料对象")
		private List<CartAddGoodsReqVO> goodsList;
	}


	@Data
	@ApiModel(value="购物车添加商品请求类",description="购物车添加商品请求类")
	public static class CartAddGoodsReqVO {

		@ApiModelProperty(value = "商品id")
		private Integer goodsId;

		@ApiModelProperty(value = "购买数量")
		@NotNull
		private Integer number;

		@ApiModelProperty(value = "价格")
		private BigDecimal price;

		@ApiModelProperty(value = "选中的规格Id")
		@NotNull
		private Integer formulaSpecificationId;

		@ApiModelProperty(value = "辅料对象")
		private List<CartAddGoodsFormulaSpecificationsDataProportioningReqVO> formulaSpecificationsDataProportioningList;

		@ApiModelProperty(value = "属性列表")
		private List<CartAddGoodsPropertyReqVo> propertyList;
	}


}
